package com.litchi.entity;

import lombok.*;
import lombok.extern.slf4j.Slf4j;

import javax.persistence.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.Date;
import java.util.Observable;
import java.util.Observer;

/**
 * Created by huash on 2016/5/7.
 */

@Entity(name = "football_match")
@Data
@EqualsAndHashCode(exclude={"id", "winProbability", "tieProbability", "lostProbability"})
@NoArgsConstructor
@RequiredArgsConstructor
public class Match implements Serializable{
    private static final long serialVersionUID = -4647106249512166538L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(name = "match_order")
    private @NonNull Integer order;
    private @NonNull String hostTeam;
    private @NonNull String guestTeam;
    private @NonNull Date time;
    private @NonNull Double winOdds;
    private @NonNull Double tieOdds;
    private @NonNull Double lostOdds;
    private @NonNull String score;
    private @NonNull boolean isFinished = false;

    private Double winProbability;
    private Double tieProbability;
    private Double lostProbability;

}
